//首页API
import axios from '../utils'

const api = {
    getCampaignsByToAPI: '/home/getCampaignsByTop',
    getCampaignsCreativeByTopAPI: '/home/getCampaignsCreativeByTop',
    //分页查询广告统计图表
    getReportChartAPI: '/home/getReportChart',
    //分页查询广告统计表格
    getReportTableAPI: '/home/getReportTable',
    //首页统计 前三个
    getReportAPI: '/home/getReport',
}

/***
 * 广告活动
 * @param params
 * @returns {*}
 */
export function getCampaignsByTo(params) {
    return axios.get(api.getCampaignsByToAPI, {
        params
    })
}

/***
 * 分页查询广告系列统计排名
 * @param params
 * @returns {*}
 */
export function getCampaignsCreativeByTop(params) {
    return axios.get(api.getCampaignsCreativeByTopAPI, {
        params
    })
}

export function getReportChart(params) {
    return axios.get(api.getReportChartAPI, {
        params
    })
}

export function getReportTable(params) {
    return axios.get(api.getReportTableAPI, {
        params
    })
}

export function getReport(params = {}) {
    return axios.get(api.getReportAPI, {
        params
    })
}

export default api
